package com.bblocks.standard.feign.fallback;

import com.bblocks.standard.entity.SysParam;
import com.bblocks.standard.feign.SysParamFeign2;
import com.bblocks.util.R;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * SysParamFeignFallBackFactory
 *
 * @author XGF
 * @date 2021-12-06 20:06:04
 */
@Slf4j
@Component
public class SysParamFeignFallBackFactory2 implements FallbackFactory<SysParamFeign2> {

  @Override
  public SysParamFeign2 create(Throwable throwable) {

    return new SysParamFeign2() {

		public R<SysParam> selectOneInnner(String paramName) {
			log.error("SysParamFeign.selectOneInnner", throwable);
			return null;
		}

		public R<String> selectOneValueInnner(String paramName,String defaultValue) {
			log.error("SysParamFeign.selectOneValueInnner", throwable);
			return null;
		}

		public R<List<SysParam>> selectOnesInnner(String paramName, Integer count){
			log.error("SysParamFeign.selectOnesInnner", throwable);
			return null;
		}

    };
  }
}
